package com.topisv.tms.rest.qimen.command;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import com.topisv.tms.exception.PaiUException;
import com.topisv.tms.rest.qimen.qmservice.DeliveryOrderReceiveService;
import com.topisv.tms.rest.qimen.qmservice.StockoutCreateService;
import com.topisv.tms.rest.qimen.request.RequestMethodType;
import com.topisv.tms.rest.qimen.request.RequestParams;
import com.topisv.tms.rest.qimen.response.ResponseParams;

/**
 * 出库单创建处理类
 *  
 */
@Component
@Lazy(false)
public class StockoutCreateCommand implements IQMRequestCommand, InitializingBean {
	@Autowired
	private StockoutCreateService service;

	@Override
	public ResponseParams execute(RequestParams params) throws PaiUException {
		return service.execute(params);
	}

	@Override
	public void afterPropertiesSet() {
		QMRequestCommandContainer.getInstance().add(RequestMethodType.STOCK_OUT_CREATE.getType(), this);
	}

	@Override
	public void executeBefore(ResponseParams qmResponse) throws PaiUException {
	}
}
